class WorkFlow {
  step1() {
    console.log('step 1');
    return this;
  }

  step2() {
    console.log('step 2');
    return this;
  }
}


class MyFlow extends WorkFlow {
  next() {
    console.log('next');
    return this;
  }
}

new MyFlow().step1().next();
